Optimal. Leaf size=85 \[ \frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \tan (c+d x)}{d}+\frac {3 a \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a \tan ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 3852,
3853, 3855} \begin {gather*} \frac {a \tan ^3(c+d x)}{3 d}+\frac {a \tan (c+d x)}{d}+\frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \tan (c+d x) \sec ^3(c+d x)}{4 d}+\frac {3 a \tan (c+d x) \sec (c+d x)}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3852
Rule 3853
Rule 3855
Rule 3872
Rubi steps
\begin {align*} \int \sec ^4(c+d x) (a+a \sec (c+d x)) \, dx &=a \int \sec ^4(c+d x) \, dx+a \int \sec ^5(c+d x) \, dx\\ &=\frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{4} (3 a) \int \sec ^3(c+d x) \, dx-\frac {a \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac {a \tan (c+d x)}{d}+\frac {3 a \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a \tan ^3(c+d x)}{3 d}+\frac {1}{8} (3 a) \int \sec (c+d x) \, dx\\ &=\frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \tan (c+d x)}{d}+\frac {3 a \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a \tan ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 76, normalized size = 0.89 \begin {gather*} \frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {3 a \left (\tanh ^{-1}(\sin (c+d x))+\sec (c+d x) \tan (c+d x)\right )}{8 d}+\frac {a \left (\tan (c+d x)+\frac {1}{3} \tan ^3(c+d x)\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 73, normalized size = 0.86
method | result | size |
derivativedivides | \(\frac {a \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(73\) |
default | \(\frac {a \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(73\) |
norman | \(\frac {\frac {13 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {31 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {49 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {3 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(121\) |
risch | \(-\frac {i a \left (9 \,{\mathrm e}^{7 i \left (d x +c \right )}+33 \,{\mathrm e}^{5 i \left (d x +c \right )}-48 \,{\mathrm e}^{4 i \left (d x +c \right )}-33 \,{\mathrm e}^{3 i \left (d x +c \right )}-64 \,{\mathrm e}^{2 i \left (d x +c \right )}-9 \,{\mathrm e}^{i \left (d x +c \right )}-16\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}\) | \(128\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 95, normalized size = 1.12 \begin {gather*} \frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a - 3 \, a {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.27, size = 99, normalized size = 1.16 \begin {gather*} \frac {9 \, a \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, a \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, a \cos \left (d x + c\right )^{3} + 9 \, a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) + 6 \, a\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \sec ^{4}{\left (c + d x \right )}\, dx + \int \sec ^{5}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 110, normalized size = 1.29 \begin {gather*} \frac {9 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 9 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 49 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 31 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 39 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.94, size = 130, normalized size = 1.53 \begin {gather*} \frac {-\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {49\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}-\frac {31\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}+\frac {13\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________